﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CoastalClimbing
{
    public partial class Passes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack) 
            {
                string image = "Day passes";  
                bool visible = false;              

                if(Request.QueryString["t"] != null) {
                    string qs = Request.QueryString["t"].ToString();

                    if(qs.Equals("m")) 
                    {
                        image = "Memberships";
                        visible = true;
                    } 
                }

                pnlDayPasses.Visible = !visible;
                pnlMemberships.Visible = visible;
                imgPasses.ImageUrl = string.Format("http://www.coastalclimbing.com/images/{0}.png", image.Replace(" " , ""));
                imgPasses.AlternateText = image;
            }
        }
    }
}